<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="toTop" content="true">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<!--头部公用部分载入-->
{{include file="VIEW_PATH/Common/header.php"}}
<link rel="stylesheet" href="./Public/Home/css/list.css" />
<script src="./Public/Home/js/lun.js" type="text/javascript"></script>
<script type="text/javascript">
	var ybdz="{{U('Cart/kczs')}}";
</script>
<script src="./Public/Home/js/base.js" type="text/javascript"></script>
<script type="text/javascript">
			$(function(){
				//表单的提交事件
				$('.buy').click(function(){
					//用class点击获得规格
					var guge = '';
					$.each($('.tuuu'), function() {
						guge += $(this).text() + ',';
					});
					
					var num=$('[name=num]').val();
//					alert(guge);
					//发送异步
					$.ajax({
						type:"post",
//						请求地址
						url:"{{U('Cart/add',array('cmid'=>$_GET['cmid']))}}",
						data:{
							options:guge,
							num:num
						},
						dataType:'json',
						success:function(data){
						     alert('添加成功');
						}
					});
				})
			})
		</script>

<!-- 轮播图开始 -->
<div id="shop-logo">
	<div class="logo-tu">
        <a href=""><img class="tu1" src="./Public/Home/img/list-logo.jpg" alt="" /></a>
        <a class="zi" href="">牛掰官方旗舰店</a>
    </div>
</div>
<!-- 轮播图结束 -->

<!--主题区域开始-->
<div id="list" >
	<div class="listall">
	    <div id="preview" class="spec-preview">
	    	<span class="jqzoom"><img width="348px" height="348px" jqimg="{{$prdata['picture'][0]}}" src="{{$prdata['picture'][0]}}" /></span>
	    </div>
	    <!--缩图开始-->
	    <div class="spec-scroll"> <a class="prev">&lt;</a> <a class="next">&gt;</a>
	      <div class="items">
	        <ul>
	          {{foreach from="$prdata['picture']" value="$v"}}
	          <li><img alt="" bimg="{{$v}}" src="{{$v}}" onmousemove="preview(this);"></li>
	          {{endforeach}}
	        </ul>
	      </div>
	    </div>
	    <!--缩图结束-->
	</div>
	
	<form action="" method="post">
	{{foreach from="$commdata" value="$v"}}
	<div class="list-right">
		<div class="list-right1">{{$v['cmname']}}</div>
	    <div class="list-right1 fg">《虎妈猫爸》官方正品 </div>
	</div>
	<div class="list-bottom">
		<div class="list-bottom1">
			<span class="bottom11">市场价</span>
			<span class="fg" style=" color:#BBBBBB;text-decoration: line-through;">￥ {{$v['mktprice']}}</span>
		</div>
		<div class="list-bottom1">
			<span class="bottom11">优酷价</span>
			<span class="fg">￥ <span class="fg gggg" c={{$v['sptprice']}}>{{$v['sptprice']}}</span></span>
		</div>
	    <div class="list-bottom2">
	    	<span class="bottom22">运费</span>
	    	<span class="bottomfg">上海</span>
	    	<span class="bottomfg">至</span>
	    	<span class="bottomfg">默认</span>
	    	<span class="bottomfg">快递:<span>15.00</span></span>
	    </div>
	    {{endforeach}}
	    {{foreach from="$spedata" value="$v"}}
	    <div class="list-bottom3" style="clear: both;">
	    	<span class="bottom33">{{$v[0]['taname']}}</span>
	    	<ul class="bottomul">
	    		{{foreach from="$v" value="$vv"}}
	    		<li a={{$vv['sid']}} b={{$vv['commodity_cmid']}}>{{$vv['sability']}}</li>
	    		{{endforeach}}
	    	</ul>
	    </div>
	    {{endforeach}}
	    <div class="list-bottom4">
	    	<span class="bottom44">数量</span>
	    	<div class="bottom444">
				<div>
					<a href="javascript:;" style="text-decoration: none;" class="jian">-</a>
					<a href="javascript:;" style="text-decoration: none;" class="jia">+</a>
					<input value="1" name="num">
				</div>
				{{foreach from="$commdata" value="$v"}}
				<div class="kcsl">库存剩余<span class="kczs">{{$v['stocks']}}</span>件</div>
			    {{endforeach}}
				<div class="bottom5">
					<a href="{{U('Cart/index',array('cmid'=>$v['cmid']))}}" class="buy">立刻购买</a>
					<a href="javascript:;" class="buy gwc">加入购物车</a>
				</div>
	    	</div>
	    </div>
		    <div class="bottom6">
		       <span class="bottom44" style="float: left;" >服务</span>
		       <span class="bottom44" style="float: left; width: 220px; height: 45px; overflow: hidden;">{{$prdata['service']}}</span>
		    </div>
	</div>
	</form>
</div>
<div style="clear: both;"></div>
<div id="content">
	<div class="content-left">
		<!--<div class="left1">
			<a href="">进入店铺</a>
		</div>
		<div class="left1">
			<a href="">进入店铺</a>
		</div>-->
		<div class="left2">
			<span style="width: 223px;">商品分类</span>
			<ul>
				{{foreach from="$cdata" value="$v" }}
				<li><a href="{{U('Cata/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a></li>
				{{endforeach}}
			</ul>
		</div>
	</div>
	<div class="content-right">
		<div class="right1">
			<a href="javascript:;" class="right1-1 gg">商品详情</a>
			<a href="javascript:;" class="right1-1 fg">售后服务</a>
		</div>
		<div class="right2">
			{{$prdata['aboutarticles']}}
		</div>
		<div class="right2" style="display: none;">
			{{$prdata['service']}}
		</div>
	</div>
</div>

<!--主题区域结束-->

<div style="clear: both;"></div>
<!--调用尾部公用-->
{{include file="VIEW_PATH/Common/end.php"}}
</body>
</html>
